package com.hello.system.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hello.common.core.annotation.Excel;
import com.hello.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 告警规则配置对象 alarm_rule_config
 * 
 * @author hello
 * @date 2025-09-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class AlarmRuleConfig extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 规则ID */
    private Long ruleId;

    /** 规则名称 */
    @Excel(name = "规则名称")
    private String ruleName;

    /** 规则类型(device=设备告警/environment=环境告警/system=系统告警/detection=检测告警) */
    @Excel(name = "规则类型(device=设备告警/environment=环境告警/system=系统告警/detection=检测告警)")
    private String ruleType;

    /** 告警级别(info=信息/warning=警告/critical=严重/emergency=紧急) */
    @Excel(name = "告警级别(info=信息/warning=警告/critical=严重/emergency=紧急)")
    private String alarmLevel;

    /** 触发条件(JSON格式) */
    @Excel(name = "触发条件(JSON格式)")
    private String triggerCondition;

    /** 阈值 */
    @Excel(name = "阈值")
    private BigDecimal thresholdValue;

    /** 比较运算符(&gt;=,,&lt;) */
    @Excel(name = "比较运算符(&gt;=,,&lt;)")
    private String comparisonOperator;

    /** 适用设备类型(多个用逗号分隔) */
    @Excel(name = "适用设备类型(多个用逗号分隔)")
    private String deviceTypes;

    /** 告警消息模板 */
    @Excel(name = "告警消息模板")
    private String alarmMessageTemplate;

    /** 通知方式(system=系统内/email=邮件/sms=短信/webhook=钩子) */
    @Excel(name = "通知方式(system=系统内/email=邮件/sms=短信/webhook=钩子)")
    private String notificationMethods;

    /** 是否启用(0=否,1=是) */
    @Excel(name = "是否启用(0=否,1=是)")
    private String isEnabled;

    public void setRuleId(Long ruleId) 
    {
        this.ruleId = ruleId;
    }

    public Long getRuleId() 
    {
        return ruleId;
    }
    public void setRuleName(String ruleName) 
    {
        this.ruleName = ruleName;
    }

    public String getRuleName() 
    {
        return ruleName;
    }
    public void setRuleType(String ruleType) 
    {
        this.ruleType = ruleType;
    }

    public String getRuleType() 
    {
        return ruleType;
    }
    public void setAlarmLevel(String alarmLevel) 
    {
        this.alarmLevel = alarmLevel;
    }

    public String getAlarmLevel() 
    {
        return alarmLevel;
    }
    public void setTriggerCondition(String triggerCondition) 
    {
        this.triggerCondition = triggerCondition;
    }

    public String getTriggerCondition() 
    {
        return triggerCondition;
    }
    public void setThresholdValue(BigDecimal thresholdValue) 
    {
        this.thresholdValue = thresholdValue;
    }

    public BigDecimal getThresholdValue() 
    {
        return thresholdValue;
    }
    public void setComparisonOperator(String comparisonOperator) 
    {
        this.comparisonOperator = comparisonOperator;
    }

    public String getComparisonOperator() 
    {
        return comparisonOperator;
    }
    public void setDeviceTypes(String deviceTypes) 
    {
        this.deviceTypes = deviceTypes;
    }

    public String getDeviceTypes() 
    {
        return deviceTypes;
    }
    public void setAlarmMessageTemplate(String alarmMessageTemplate) 
    {
        this.alarmMessageTemplate = alarmMessageTemplate;
    }

    public String getAlarmMessageTemplate() 
    {
        return alarmMessageTemplate;
    }
    public void setNotificationMethods(String notificationMethods) 
    {
        this.notificationMethods = notificationMethods;
    }

    public String getNotificationMethods() 
    {
        return notificationMethods;
    }
    public void setIsEnabled(String isEnabled) 
    {
        this.isEnabled = isEnabled;
    }

    public String getIsEnabled() 
    {
        return isEnabled;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("ruleId", getRuleId())
            .append("ruleName", getRuleName())
            .append("ruleType", getRuleType())
            .append("alarmLevel", getAlarmLevel())
            .append("triggerCondition", getTriggerCondition())
            .append("thresholdValue", getThresholdValue())
            .append("comparisonOperator", getComparisonOperator())
            .append("deviceTypes", getDeviceTypes())
            .append("alarmMessageTemplate", getAlarmMessageTemplate())
            .append("notificationMethods", getNotificationMethods())
            .append("isEnabled", getIsEnabled())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
